<template>
	<view class="tt-banner">
		<swiper :current="index" circular="true">
			<block v-for="item in bannerList" :key="item.id">
				<swiper-item>
					<navigator url="/pages/advert/advert" class="link">
						<image :src="item.src"  mode="aspectFill" class="photo"></image>
					</navigator>
				</swiper-item>
			</block>
		</swiper>
	</view>
</template>

<script>
	export default {
		name:"tt-swiper-comp",
		props: {
			bannerList: {
				type: Array
			},
			index: {
				type: Number
			}
		},
		data() {
			return {
				
			};
		}
	}
</script>

<style lang="scss">
.tt-banner {
	width: 100%;
	.link {
		width: 100%;
		height: 300rpx;
		display: block;
		.photo {
			width: 100%;
			height: 100%;
		}
	}
}
</style>